<?php
/**
 * Created by PhpStorm OF Administrator.
 * User: YUYI
 * Date: 2018/7/26 0026
 * Time: 下午 4:51
 * Administrator
 */

namespace app\common\service;


use app\common\util\GetuiUtil;

class PushService extends BaseService
{
    use GetuiUtil;
    public static function pushToOneUser($cid,$title,$connect,$payload = null)
    {
        $data = [
            'cid'=>$cid
            ,'messTitle'=>$title
            ,'messSummary'=>$connect
            ,'payload'=>$payload?:'{name:"鱼子"}'
        ];
        $res = (new self())->pushMessageToSingle($data['cid'], $data['messTitle'], $data['messSummary'], $data['payload']);
        if ($res['result'] == 'ok'){
            return true;
        }
    }
}